<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p8_绝对定位</title>
    <style>
        .fu {
            background-color: #ff0;
            /* 子绝父相 */
            position: relative;
        }
        .fu>div {
            width: 100px;
            height: 100px;
        }
        .z1 {
            background-color: red;
        }
        .z2 {
            background-color: green;
            /*绝对定位:会脱离文档流、释放布局空间
            移动参照物:离自己最近的,有非静态定位属性的上层元素*/
            position: absolute;
            /*bottom: 0;*/
            top: 50px;
            left: 50px;
        }
        .z3 {
            background-color: blue;
            position: relative;
        }
    </style>
</head>
<body>
<div class="fu">
    <div class="z1"></div>
    <div class="z2"></div>
    <div class="z3"></div>
</div>
</body>
</html>